﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PMS.ENT;
using PMS.DAL;

namespace PMS.BLL
{
    public class ReferenceBLL
    {
        #region Get
        public static ReferenceENT GetReferenceByID(int referenceID)
        {
            try
            {
                return ReferenceDAL.GetReferenceByID(referenceID);
            }
            catch (Exception)
            {
                throw;
            }
        }

        public static ReferenceCollection GetReferenceList(int projectID, string orderBy, string orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                return ReferenceDAL.GetReferenceList(projectID, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception)
            {
                throw;
            }
        }

        public static ReferenceCollection GetReferenceList(string referenceID)
        {
            try
            {
                return ReferenceDAL.GetReferenceList(referenceID);
            }
            catch (Exception)
            {
                throw;
            }
        }



        public static ReferenceCollection GetReferenceListByStatementID(int statementID)
        {
            try
            {
                return ReferenceDAL.GetReferenceListByStatementID(statementID);
            }
            catch (Exception)
            {
                throw;
            }
        }

        #endregion

        #region Insert Update Delete Confirm

        public static int InsertReference(ReferenceENT reference)
        {
            try
            {
                return ReferenceDAL.InsertReference(reference);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int UpdateReference(ReferenceENT reference)
        {
            try
            {
                return ReferenceDAL.UpdateReference(reference);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int DeleteReference(string referenceID, int userID)
        {
            try
            {
                return ReferenceDAL.DeleteReference(referenceID, userID);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int ShowReference(string referenceID, int userID)
        {
            try
            {
                return ReferenceDAL.ShowReference(referenceID, userID);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public static int HideReference(string referenceID, int userID)
        {
            try
            {
                return ReferenceDAL.HideReference(referenceID, userID);
            }
            catch (Exception)
            {

                throw;
            }
        }

        #endregion


    }
}
